package makabakaquestionnaire.zutsoftware.framework.file;

import makabakaquestionnaire.zutsoftware.constant.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class FileController {
    FileServiceImpl fileService;
    @Autowired
    public void setFileService(FileServiceImpl fileService) {
        this.fileService = fileService;
    }

    @PostMapping("/upload")
   private Result upload(@RequestParam("file")MultipartFile file){
        return fileService.upload(file);
    }
}
